//
//  ColorChooseViewController.swift
//  NoteBook
//
//  Created by iOS Developer on 2017/4/27.
//  Copyright © 2017年 sunsheen. All rights reserved.
//

import UIKit

class ColorChooseViewController: UIViewController {
    weak var colorDelegate: CellColorDelegate?
    var indexPath: IndexPath?
    @IBAction func colorSelected(_ sender: ColorButton) {
        colorDelegate?.setColor4Cell(at: indexPath!, with: sender.backgroundColor!)
        dismiss(animated: true)
    }
}

protocol CellColorDelegate:class {
    func setColor4Cell(at indexPath: IndexPath, with color: UIColor)
}
